package ziface

import "net"

type IConnection interface {
	//启动连接
	Start()
	//停止连接
	Stop()
	//获取当前连接的绑定socket conn
	GetTcpConnection() *net.TCPConn
	//获取当前连接
	GetConnId() uint32
	//获取远程客服端的tcp状态 ip port
	RemoteAddr() net.Addr
	//发送数据
	SendMsg(msgId uint32,data []byte) error
}

type HandleFunc func(*net.TCPConn, []byte, int) error
